500 |
How can I filter items for dates before a specified date
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() var_Column = oTree.Columns.Add("Dates") var_Column.SortType = 2 var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .t. var_Column.DisplayFilterDate = .t. var_Column.FilterList = 1026 'exShowFocusItem + exNoItems var_Column.Filter = "to 12/27/2010" var_Column.FilterType = 4 var_Items = oTree.Items var_Items.AddItem({12/27/2010}) var_Items.AddItem({12/28/2010}) var_Items.AddItem({12/29/2010}) var_Items.AddItem({12/30/2010}) var_Items.AddItem({12/31/2010}) oTree.ApplyFilter() oTree.EndUpdate() |
499 |
Is it possible to filter dates
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() var_Column = oTree.Columns.Add("Dates") var_Column.SortType = 2 var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .t. var_Column.DisplayFilterDate = .t. var_Column.FilterList = 1026 'exShowFocusItem + exNoItems var_Items = oTree.Items var_Items.AddItem({12/27/2010}) var_Items.AddItem({12/28/2010}) var_Items.AddItem({12/29/2010}) var_Items.AddItem({12/30/2010}) var_Items.AddItem({12/31/2010}) oTree.EndUpdate() |
498 |
Is it possible to change the Exclude field name to something different, in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Template = "Description(25) = `Leaving out`" // oTree.Description(25) = "Leaving out" var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") oTree.EndUpdate() |
497 |
How can I display the Exclude field in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") oTree.EndUpdate() |
496 |
Is it possible to show and ensure the focused item from the control, in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 1280 'exShowFocusItem + exShowCheckBox var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") ' var_Items.SelectItem(var_Items.InsertItem(h,,"Child 2")) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.SelectItem(InsertItem(h,,`Child 2`)) = True" ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" oTree.EndUpdate() |
495 |
Is it possible to show only blanks items with no listed items from the control
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 16386 'exShowBlanks + exNoItems var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
494 |
How can I include the blanks items in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 16640 'exShowBlanks + exShowCheckBox var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
493 |
How can I select multiple items in the drop down filter window, using check-boxes
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 256 var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
492 |
Is it possible to allow a single item being selected in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 128 var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
491 |
How can I display no (All) item in the drop down filter window
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Template = "Description(0) = ``" // oTree.Description(0) = "" var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .t. var_Column.FilterList = 2 var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
490 |
Is it possible to display no items in the drop down filter window, so only the pattern is visible
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Items") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .t. var_Column.FilterList = 2 var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.EndUpdate() |
489 |
How do I hide the selection
Dim oTree as P Dim var_Column as P Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.MarkSearchColumn = .f. oTree.SelForeColor = oTree.ForeColor oTree.SelBackColor = oTree.BackColor oTree.ShowFocusRect = .f. var_Columns = oTree.Columns var_Column = var_Columns.Add("Format") var_Column.FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )" ' var_Column.Def(17) = 1 oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Items = oTree.Items var_Items.AddItem(10) var_Items.AddItem(-8) oTree.EndUpdate() |
488 |
How do I access the cells, or how do I get the values in the columns
Dim h as N Dim oTree as P Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Columns = oTree.Columns var_Columns.Add("C1") var_Columns.Add("C2") var_Columns.Add("C3") var_Items = oTree.Items h = var_Items.AddItem("Item 1") ' var_Items.CellCaption(h,1) = "SubItem 1.1" oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = `SubItem 1.1`" ' var_Items.CellCaption(h,2) = "SubItem 1.2" oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,2) = `SubItem 1.2`" ? var_Items.CellCaption(h,0) |
487 |
Is it possible to load child items when clicking the +/- button
' Fired before an item is about to be expanded (collapsed). function BeforeExpandItem as v (Item as OLE::Exontrol.Tree.1::HITEM,Cancel as A) Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Items = oTree.Items var_Items.InsertItem(Item,,"new") ' var_Items.ItemHasChildren(var_Items.InsertItem(Item,,"new")) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHasChildren(InsertItem(Item,,`new`)) = True" var_Items.InsertItem(Item,,"new") end function Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = -1 oTree.Columns.Add("Default") var_Items = oTree.Items ' var_Items.ItemHasChildren(var_Items.AddItem("aka")) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHasChildren(AddItem(`aka`)) = True" var_Items.AddItem("next item") |
486 |
How can I change the check-boxes appearance
Dim h as N Dim oTree as P Dim var_Appearance as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("Default") ' var_Column.Def(0) = .t. oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(0) = True" var_Column.PartialCheck = .t. var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" var_Appearance = oTree.VisualAppearance var_Appearance.Add(1,"XP:Button 3 12") var_Appearance.Add(2,"XP:Button 3 11") var_Appearance.Add(3,"XP:Button 3 10") oTree.Template = "CheckImage(0) = 16777216" // oTree.CheckImage(0) = 16777216 oTree.Template = "CheckImage(1) = 33554432" // oTree.CheckImage(1) = 33554432 oTree.Template = "CheckImage(2) = 50331648" // oTree.CheckImage(2) = 50331648 |
485 |
How can I initiate the OLE Drag and Drop support
' Occurs when the OLEDrag method is called. function OLEStartDrag as v (Data as OLE::Exontrol.Tree.1::IExDataObject,AllowedEffects as N) ' Data.SetData("data to drag") oTree = topparent:CONTROL_ACTIVEX1.activex AllowedEffects = 1 end function Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.OLEDropMode = 1 oTree.LinesAtRoot = -1 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
484 |
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
Dim oTree as P Dim var_Columns as P Dim var_ConditionalFormat as P Dim var_ConditionalFormat1 as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() var_ConditionalFormat = oTree.ConditionalFormats.Add("1","K1") var_ConditionalFormat.BackColor = 255 var_ConditionalFormat.ApplyTo = 1 '1 + var_ConditionalFormat1 = oTree.ConditionalFormats.Add("1","K2") var_ConditionalFormat1.BackColor = 255 var_ConditionalFormat1.ApplyTo = 2 '2 + oTree.MarkSearchColumn = .f. oTree.DrawGridLines = -2 var_Columns = oTree.Columns var_Columns.Add("Column 1") var_Columns.Add("Column 2") var_Columns.Add("Column 3") var_Items = oTree.Items var_Items.AddItem() var_Items.AddItem() var_Items.AddItem() oTree.EndUpdate() |
483 |
Is it possible to display empty strings for 0 values
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Currency").FormatColumn = "dbl(value) ? currency(dbl(value)) : ``" var_Column = oTree.Columns.Add("Currency") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.FormatColumn = `dbl(value) ? currency(dbl(value)) : `````" var_Items = oTree.Items var_Items.AddItem(1.23) var_Items.AddItem(2.34) var_Items.AddItem(0) var_Items.AddItem(10000.99) |
482 |
Is it possible to display empty strings for 0 values
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Number") ' oTree.Columns.Add("Currency").ComputedField = "%0 ? currency(%0) : ``" var_Column = oTree.Columns.Add("Currency") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `%0 ? currency(%0) : `````" var_Items = oTree.Items var_Items.AddItem(1.23) var_Items.AddItem(2.34) var_Items.AddItem(0) var_Items.AddItem(10000.99) |
481 |
How can I get the list of items as they are displayed
Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.BackColorAlternate = 15790320 oTree.Columns.Add("Names") var_Items = oTree.Items var_Items.AddItem("Mantel") var_Items.AddItem("Mechanik") var_Items.AddItem("Motor") var_Items.AddItem("Murks") var_Items.AddItem("Märchen") var_Items.AddItem("Möhren") var_Items.AddItem("Mühle") oTree.Columns.Item(0).SortOrder = 1 oTree.EndUpdate() ? oTree.GetItems(1) |
480 |
Is posible to reduce the size of the picture to be shown in the column's caption
Dim oTree as P Dim var_Column as local Dim var_Column1 as local oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\zipdisk.gif`" // oTree.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif" oTree.HeaderHeight = 48 ' oTree.Columns.Add("DefaultSize").HTMLCaption = "Default-Size <img>pic1</img> Picture" var_Column = oTree.Columns.Add("DefaultSize") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.HTMLCaption = `Default-Size <img>pic1</img> Picture`" ' oTree.Columns.Add("CustomSize").HTMLCaption = "Custom-Size <img>pic1:16</img> Picture" var_Column1 = oTree.Columns.Add("CustomSize") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.HTMLCaption = `Custom-Size <img>pic1:16</img> Picture`" oTree.EndUpdate() |
479 |
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
Dim oTree as P Dim var_Column as P Dim var_ConditionalFormat as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.MarkSearchColumn = .f. var_ConditionalFormat = oTree.ConditionalFormats.Add("1") var_ConditionalFormat.Bold = .t. var_ConditionalFormat.ForeColor = 255 var_ConditionalFormat.ApplyTo = 1 '1 + oTree.Columns.Add("C1") var_Column = oTree.Columns.Add("C2") var_Column.HeaderBold = .t. var_Column.HTMLCaption = "<fgcolor=FF0000>C2" var_Items = oTree.Items ' var_Items.CellCaption(var_Items.AddItem(10),1) = 11 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(10),1) = 11" ' var_Items.CellCaption(var_Items.AddItem(12),1) = 13 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(12),1) = 13" oTree.EndUpdate() |
478 |
The item is not getting selected when clicking the cell's checkbox. What should I do
' Fired after cell's state has been changed. function CellStateChanged as v (Item as OLE::Exontrol.Tree.1::HITEM,ColIndex as N) Dim var_Items as local oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Items.SelectItem(Item) = .t. var_Items = oTree.Items oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.SelectItem(Item) = True" end function Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Check").Def(0) = .t. var_Column = oTree.Columns.Add("Check") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(0) = True" var_Items = oTree.Items var_Items.AddItem(0) var_Items.AddItem(1) var_Items.AddItem(2) var_Items.AddItem(3) |
477 |
Is it possible to limit the height of the item while resizing
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.Tree.1::HITEM) Dim var_Items as local Dim var_Items1 as local oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Items.ItemMinHeight(Item) = 18 var_Items = oTree.Items oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemMinHeight(Item) = 18" ' oTree.Items.ItemMaxHeight(Item) = 72 var_Items1 = oTree.Items oTree.TemplateDef = "dim var_Items1" oTree.TemplateDef = var_Items1 oTree.Template = "var_Items1.ItemMaxHeight(Item) = 72" end function Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ItemsAllowSizing = -1 oTree.ScrollBySingleLine = .f. oTree.BackColorAlternate = 15790320 oTree.Columns.Add("Names") var_Items = oTree.Items var_Items.AddItem("Mantel") var_Items.AddItem("Mechanik") var_Items.AddItem("Motor") var_Items.AddItem("Murks") var_Items.AddItem("Märchen") var_Items.AddItem("Möhren") var_Items.AddItem("Mühle") oTree.Columns.Item(0).SortOrder = 1 oTree.EndUpdate() |
476 |
Is it possible to copy the hierarchy of the control using the GetItems method
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = -1 oTree.Columns.Add("Def") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") oTree.PutItems(oTree.GetItems(-1)) |
475 |
How can I show the child items with no identation
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 5 oTree.Indent = 12 oTree.HasLines = 2 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") |
474 |
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 1 oTree.Indent = 12 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
473 |
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 5 oTree.Indent = 12 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") |
472 |
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 4 oTree.Indent = 12 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
471 |
Is there other ways of showing the hierarchy lines (exGroupLinesInside)
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 3 oTree.Indent = 12 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
470 |
Is there other ways of showing the hierarchy lines (exGroupLines)
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.LinesAtRoot = 2 oTree.Indent = 12 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(var_Items.InsertItem(h,,"Child 2"),,"SubChild 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
469 |
Does your control supports multiple lines tooltip
Dim oTree as P Dim var_Column as local oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\zipdisk.gif`" // oTree.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif" oTree.ToolTipDelay = 1 ' oTree.Columns.Add("tootip").ToolTip = "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>" var_Column = oTree.Columns.Add("tootip") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ToolTip = `<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>`" |
468 |
How can I prevent highlighting the column from the cursor - point
Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Column2 as local Dim var_Column3 as local Dim var_Column4 as local Dim var_Column5 as local Dim var_Column6 as local Dim var_Column7 as local oTree = topparent:CONTROL_ACTIVEX1.activex oTree.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=") oTree.Template = "Background(32) = 16777216" // oTree.Background(32) = 16777216 ' oTree.Columns.Add("S").Width = 32 var_Column = oTree.Columns.Add("S") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 32" ' oTree.Columns.Add("Level 1").LevelKey = 1 var_Column1 = oTree.Columns.Add("Level 1") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.LevelKey = 1" ' oTree.Columns.Add("Level 2").LevelKey = 1 var_Column2 = oTree.Columns.Add("Level 2") oTree.TemplateDef = "dim var_Column2" oTree.TemplateDef = var_Column2 oTree.Template = "var_Column2.LevelKey = 1" ' oTree.Columns.Add("Level 3").LevelKey = 1 var_Column3 = oTree.Columns.Add("Level 3") oTree.TemplateDef = "dim var_Column3" oTree.TemplateDef = var_Column3 oTree.Template = "var_Column3.LevelKey = 1" ' oTree.Columns.Add("E1").Width = 32 var_Column4 = oTree.Columns.Add("E1") oTree.TemplateDef = "dim var_Column4" oTree.TemplateDef = var_Column4 oTree.Template = "var_Column4.Width = 32" ' oTree.Columns.Add("E2").Width = 32 var_Column5 = oTree.Columns.Add("E2") oTree.TemplateDef = "dim var_Column5" oTree.TemplateDef = var_Column5 oTree.Template = "var_Column5.Width = 32" ' oTree.Columns.Add("E3").Width = 32 var_Column6 = oTree.Columns.Add("E3") oTree.TemplateDef = "dim var_Column6" oTree.TemplateDef = var_Column6 oTree.Template = "var_Column6.Width = 32" ' oTree.Columns.Add("E4").Width = 32 var_Column7 = oTree.Columns.Add("E4") oTree.TemplateDef = "dim var_Column7" oTree.TemplateDef = var_Column7 oTree.Template = "var_Column7.Width = 32" |
467 |
Is there any option to show the tooltip programmatically
' Occurs when the user moves the mouse. function MouseMove as v (Button as N,Shift as N,X as OLE::Exontrol.Tree.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Tree.1::OLE_YPOS_PIXELS) oTree = topparent:CONTROL_ACTIVEX1.activex oTree.ShowToolTip(oTree.ItemFromPoint(-1,-1,c,hit),"","8","8") end function Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.Columns.Add("Def") var_Items = oTree.Items var_Items.AddItem("Item 1") var_Items.AddItem("Item 2") var_Items.AddItem("Item 3") oTree.EndUpdate() |
466 |
Is it possible to prevent changing the rows/items colors by selection
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.SelBackMode = 1 ' oTree.Columns.Add("HTML").Def(17) = 1 var_Column = oTree.Columns.Add("HTML") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Items = oTree.Items var_Items.AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.") ' var_Items.SelectItem(var_Items.AddItem("<font ;6>This</font> <b>is</b> another <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.")) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.SelectItem(AddItem(`<font ;6>This</font> <b>is</b> another <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.`)) = True" |
465 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.MarkSearchColumn = .f. oTree.Columns.Add("Value") oTree.Columns.Add("FormatCell") var_Items = oTree.Items h = var_Items.AddItem(1) ' var_Items.CellCaption(h,1) = 12 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = 12" ' var_Items.FormatCell(h,1) = "currency(value)" oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.FormatCell(h,1) = `currency(value)`" h = var_Items.AddItem({01/01/2001}) ' var_Items.CellCaption(h,1) = {01/01/2001} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #1/1/2001#" ' var_Items.CellCaptionFormat(h,1) = 1 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaptionFormat(h,1) = 1" ' var_Items.FormatCell(h,1) = "longdate(value) replace '2001' with '<b>2001</b>'" oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.FormatCell(h,1) = `longdate(value) replace '2001' with '<b>2001</b>'`" oTree.EndUpdate() |
464 |
How can I simulate displaying groups
Dim h as N Dim h1 as N Dim oTree as P Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.HasLines = 0 oTree.ScrollBySingleLine = .t. oTree.MarkSearchColumn = .f. var_Columns = oTree.Columns var_Columns.Add("Name") var_Columns.Add("A") var_Columns.Add("B") var_Columns.Add("C") var_Items = oTree.Items h = var_Items.AddItem("Group 1") ' var_Items.CellHAlignment(h,0) = 1 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellHAlignment(h,0) = 1" ' var_Items.ItemDivider(h) = 0 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemDividerLineAlignment(h) = 3 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemDividerLineAlignment(h) = 3" ' var_Items.ItemHeight(h) = 24 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemHeight(h) = 24" ' var_Items.SortableItem(h) = .f. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.SortableItem(h) = False" h1 = var_Items.InsertItem(h,,"Child 1") ' var_Items.CellCaption(h1,1) = 1 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,1) = 1" ' var_Items.CellCaption(h1,2) = 2 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,2) = 2" ' var_Items.CellCaption(h1,3) = 3 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,3) = 3" h1 = var_Items.InsertItem(h,,"Child 2") ' var_Items.CellCaption(h1,1) = 4 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,1) = 4" ' var_Items.CellCaption(h1,2) = 5 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,2) = 5" ' var_Items.CellCaption(h1,3) = 6 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,3) = 6" ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Group 2") ' var_Items.CellHAlignment(h,0) = 1 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellHAlignment(h,0) = 1" ' var_Items.ItemDivider(h) = 0 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemDividerLineAlignment(h) = 3 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemDividerLineAlignment(h) = 3" ' var_Items.ItemHeight(h) = 24 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ItemHeight(h) = 24" ' var_Items.SortableItem(h) = .f. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.SortableItem(h) = False" h1 = var_Items.InsertItem(h,,"Child 1") ' var_Items.CellCaption(h1,1) = 1 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,1) = 1" ' var_Items.CellCaption(h1,2) = 2 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,2) = 2" ' var_Items.CellCaption(h1,3) = 3 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,3) = 3" h1 = var_Items.InsertItem(h,,"Child 2") ' var_Items.CellCaption(h1,1) = 4 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,1) = 4" ' var_Items.CellCaption(h1,2) = 5 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,2) = 5" ' var_Items.CellCaption(h1,3) = 6 oTree.TemplateDef = "dim var_Items,h1" oTree.TemplateDef = var_Items oTree.TemplateDef = h1 oTree.Template = "var_Items.CellCaption(h1,3) = 6" ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" oTree.EndUpdate() |
463 |
How can I collapse all items
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(0) = .f. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ExpandItem(0) = False" oTree.EndUpdate() |
462 |
How can I expand all items
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(0) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ExpandItem(0) = True" oTree.EndUpdate() |
461 |
Can I use PNG images to display pictures in the control
Dim oTree as P Dim var_Column as local oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\card.png`" // oTree.HTMLPicture("pic1") = "c:\exontrol\images\card.png" oTree.HeaderHeight = 48 ' oTree.Columns.Add("ColumnName").HTMLCaption = "<b>HTML</b> Column <img>pic1</img> Picture" var_Column = oTree.Columns.Add("ColumnName") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.HTMLCaption = `<b>HTML</b> Column <img>pic1</img> Picture`" |
460 |
Is it possible to move an item from a parent to another
Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items var_Items.AddItem("A") var_Items.AddItem("B") var_Items.InsertItem(var_Items.AddItem("C"),"","D") var_Items.SetParent(var_Items.FindItem("D",0),var_Items.FindItem("A",0)) oTree.EndUpdate() |
459 |
How can I change the identation for an item
Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items var_Items.AddItem("A") var_Items.AddItem("B") var_Items.InsertItem(var_Items.AddItem("C"),"","D") var_Items.SetParent(var_Items.FindItem("D",0),0) oTree.EndUpdate() |
458 |
How can I filter programatically using more columns
Dim oTree as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.MarkSearchColumn = .f. var_Columns = oTree.Columns var_Columns.Add("Car") var_Columns.Add("Equipment") var_Items = oTree.Items ' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag`" ' var_Items.CellCaption(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`" ' var_Items.CellCaption(var_Items.AddItem("Ford"),1) = "Air condition" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Ford`),1) = `Air condition`" ' var_Items.CellCaption(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`" ' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`" ' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "ABS,ESP" oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`" var_Column = oTree.Columns.Item("Car") var_Column.FilterType = 240 var_Column.Filter = "Mazda" var_Column1 = oTree.Columns.Item("Equipment") var_Column1.FilterType = 3 var_Column1.Filter = "*ABS*|*ESP*" oTree.ApplyFilter() oTree.EndUpdate() |
457 |
Is it possible to colour a particular column, I mean the cell's foreground color
Dim oTree as P Dim var_Columns as P Dim var_ConditionalFormat as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() var_ConditionalFormat = oTree.ConditionalFormats.Add("1") var_ConditionalFormat.ForeColor = 255 var_ConditionalFormat.ApplyTo = 1 '1 + oTree.MarkSearchColumn = .f. var_Columns = oTree.Columns var_Columns.Add("Column 1") var_Columns.Add("Column 2") var_Items = oTree.Items ' var_Items.CellCaption(var_Items.AddItem(0),1) = 1 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(0),1) = 1" ' var_Items.CellCaption(var_Items.AddItem(2),1) = 3 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(2),1) = 3" ' var_Items.CellCaption(var_Items.AddItem(4),1) = 5 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(4),1) = 5" oTree.EndUpdate() |
456 |
Is it possible to colour a particular column for specified values
Dim oTree as P Dim var_Columns as P Dim var_ConditionalFormat as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() var_ConditionalFormat = oTree.ConditionalFormats.Add("int(%1) in (3,4,5)") var_ConditionalFormat.BackColor = 255 var_ConditionalFormat.ApplyTo = 1 '1 + oTree.MarkSearchColumn = .f. var_Columns = oTree.Columns var_Columns.Add("Column 1") var_Columns.Add("Column 2") var_Items = oTree.Items ' var_Items.CellCaption(var_Items.AddItem(0),1) = 1 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(0),1) = 1" ' var_Items.CellCaption(var_Items.AddItem(2),1) = 3 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(2),1) = 3" ' var_Items.CellCaption(var_Items.AddItem(4),1) = 5 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(4),1) = 5" oTree.EndUpdate() |
455 |
Is it possible to colour a particular column
Dim oTree as P Dim var_Column as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.MarkSearchColumn = .f. var_Columns = oTree.Columns var_Columns.Add("Column 1") ' var_Columns.Add("Column 2").Def(4) = 255 var_Column = var_Columns.Add("Column 2") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(4) = 255" var_Items = oTree.Items ' var_Items.CellCaption(var_Items.AddItem(0),1) = 1 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(0),1) = 1" ' var_Items.CellCaption(var_Items.AddItem(2),1) = 3 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(2),1) = 3" ' var_Items.CellCaption(var_Items.AddItem(4),1) = 5 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellCaption(AddItem(4),1) = 5" oTree.EndUpdate() |
454 |
How do i get all the children items that are under a certain parent Item handle
Dim h as N Dim hChild as N Dim oTree as P Dim var_Items as P Dim var_Items1 as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("P") var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" var_Items1 = oTree.Items hChild = var_Items1.ItemChild(var_Items1.FirstVisibleItem) ? var_Items1.CellCaption(hChild,0) ? var_Items1.CellCaption(var_Items1.NextSiblingItem(hChild),0) oTree.EndUpdate() |
453 |
How can I get the caption of focused item
' Fired after a new item has been selected. function SelectionChanged as v () Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Items = oTree.Items ? "Handle" ? var_Items.FocusItem ? "Caption" ? var_Items.CellCaption(var_Items.FocusItem,0) end function Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items h = var_Items.AddItem("R1") var_Items.InsertItem(h,,"Cell 1.1") var_Items.InsertItem(h,,"Cell 1.2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("R2") var_Items.InsertItem(h,,"Cell 2.1") var_Items.InsertItem(h,,"Cell 2.2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" oTree.EndUpdate() |
452 |
How can I get the caption of selected item
' Fired after a new item has been selected. function SelectionChanged as v () Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Items = oTree.Items ? "Handle" ? var_Items.SelectedItem(0) ? "Caption" ? var_Items.CellCaption(var_Items.SelectedItem(0),0) end function Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.LinesAtRoot = -1 oTree.Columns.Add("Items") var_Items = oTree.Items h = var_Items.AddItem("R1") var_Items.InsertItem(h,,"Cell 1.1") var_Items.InsertItem(h,,"Cell 1.2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("R2") var_Items.InsertItem(h,,"Cell 2.1") var_Items.InsertItem(h,,"Cell 2.2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" oTree.EndUpdate() |
451 |
Can I display the cell's check box after the text
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Column = oTree.Columns.Add("Column") ' var_Column.Def(0) = .t. oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(0) = True" ' var_Column.Def(34) = "caption,check" oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(34) = `caption,check`" var_Items = oTree.Items ' var_Items.CellHasCheckBox(var_Items.AddItem("Caption 1"),0) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellHasCheckBox(AddItem(`Caption 1`),0) = True" ' var_Items.CellHasCheckBox(var_Items.AddItem("Caption 2"),0) = .t. oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.CellHasCheckBox(AddItem(`Caption 2`),0) = True" |
450 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") ' oTree.Columns.Add("Column").Def(34) = "caption,check,icon,icons,picture" var_Column = oTree.Columns.Add("Column") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(34) = `caption,check,icon,icons,picture`" var_Items = oTree.Items h = var_Items.AddItem("Text") ' var_Items.CellImage(h,0) = 1 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellImage(h,0) = 1" ' var_Items.CellHasCheckBox(h,0) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellHasCheckBox(h,0) = True" |
449 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") ' oTree.Columns.Add("Column").Def(34) = "caption,icon,check,icons,picture" var_Column = oTree.Columns.Add("Column") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(34) = `caption,icon,check,icons,picture`" var_Items = oTree.Items h = var_Items.AddItem("Text") ' var_Items.CellImage(h,0) = 1 oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellImage(h,0) = 1" |
448 |
Does your control support RightToLeft property for RTL languages or right to left
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ScrollBars = 15 oTree.LinesAtRoot = -1 var_Column = oTree.Columns.Add("P1") ' var_Column.Def(0) = .t. oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(0) = True" var_Column.PartialCheck = .t. var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" oTree.RightToLeft = .t. oTree.EndUpdate() |
447 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
Dim oTree as P Dim var_Columns as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ScrollBars = 15 var_Columns = oTree.Columns var_Columns.Add("C1") var_Columns.Add("C2") var_Columns.Add("C3") var_Columns.Add("C4") var_Columns.Add("C5") var_Columns.Add("C6") var_Columns.Add("C7") var_Columns.Add("C8") oTree.RightToLeft = .t. oTree.EndUpdate() |
446 |
How can I use the CASE statement (CASE usage)
Dim oTree as P Dim var_Column as local Dim var_Column1 as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() ' oTree.Columns.Add("Value").Width = 24 var_Column = oTree.Columns.Add("Value") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 24" var_Column1 = oTree.Columns.Add("CASE - statment") var_Column1.ComputedField = "%0 case (default:'not found';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourtheen')" var_Column1.ToolTip = var_Column1.ComputedField var_Items = oTree.Items var_Items.AddItem(0) var_Items.AddItem(1) var_Items.AddItem(2) oTree.EndUpdate() |
445 |
How can I use the CASE statement (CASE usage)
Dim oTree as P Dim var_Column as local Dim var_Column1 as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() ' oTree.Columns.Add("Value").Width = 24 var_Column = oTree.Columns.Add("Value") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 24" var_Column1 = oTree.Columns.Add("CASE - statment") var_Column1.ComputedField = "%0 case (default:'not found';1:'One';2:'Two';3:'Three';4:'Four';5:'Five';7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourtheen')" var_Column1.ToolTip = var_Column1.ComputedField var_Items = oTree.Items var_Items.AddItem(0) var_Items.AddItem(1) var_Items.AddItem(2) oTree.EndUpdate() |
444 |
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
Dim oTree as P Dim var_Column as local Dim var_Column1 as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() ' oTree.Columns.Add("Value").Width = 24 var_Column = oTree.Columns.Add("Value") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 24" var_Column1 = oTree.Columns.Add("SWITCH - statment") var_Column1.ComputedField = "%0 switch ('not found', 1,2,3,4,5,7,8,9,11,13,14)" var_Column1.ToolTip = var_Column1.ComputedField var_Items = oTree.Items var_Items.AddItem(0) var_Items.AddItem(1) var_Items.AddItem(2) oTree.EndUpdate() |
443 |
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
Dim oTree as P Dim var_Column as local Dim var_Column1 as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() ' oTree.Columns.Add("Value").Width = 24 var_Column = oTree.Columns.Add("Value") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 24" var_Column1 = oTree.Columns.Add("IN - statment") var_Column1.ComputedField = "%0 in (1,2,3,4,5,7,8,9,11,13,14) ? 'found' : ''" var_Column1.ToolTip = var_Column1.ComputedField var_Items = oTree.Items var_Items.AddItem(0) var_Items.AddItem(1) var_Items.AddItem(2) oTree.EndUpdate() |
442 |
Is is possible to use HTML tags to display in the filter caption
Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.FilterBarPromptVisible = .t. oTree.FilterBarCaption = "This is a bit of text being displayed in the filter bar." oTree.Columns.Add("") var_Items = oTree.Items var_Items.AddItem("Item 1") var_Items.AddItem("Item 2") var_Items.AddItem("Item 3") oTree.EndUpdate() |
441 |
How can I find the number of items after filtering
Dim h as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.Columns.Add("") var_Items = oTree.Items h = var_Items.AddItem("") ' var_Items.CellCaption(h,0) = var_Items.VisibleItemCount oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,0) = VisibleItemCount" oTree.EndUpdate() |
440 |
How can I change the filter caption
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 12801 'exFilterPromptWords + exFilterPromptContainsAll oTree.FilterBarPromptPattern = "london robert" oTree.FilterBarCaption = "<r>Found: ... " var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
439 |
While using the filter prompt is it is possible to use wild characters
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 16 oTree.FilterBarPromptPattern = "lon* seat*" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
438 |
How can I list all items that contains any of specified words, not necessary at the beggining
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 4610 'exFilterPromptStartWords + exFilterPromptContainsAny oTree.FilterBarPromptPattern = "london davolio" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
437 |
How can I list all items that contains any of specified words, not strings
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 12802 'exFilterPromptWords + exFilterPromptContainsAny oTree.FilterBarPromptPattern = "london nancy" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
436 |
How can I list all items that contains all specified words, not strings
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 12801 'exFilterPromptWords + exFilterPromptContainsAll oTree.FilterBarPromptPattern = "london robert" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
435 |
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 258 'exFilterPromptCaseSensitive + exFilterPromptContainsAny oTree.FilterBarPromptPattern = "Anne" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
434 |
Is it possible to list only items that ends with any of specified strings
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 4 oTree.FilterBarPromptColumns = "0" oTree.FilterBarPromptPattern = "Fuller" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
433 |
Is it possible to list only items that ends with any of specified strings
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 4 oTree.FilterBarPromptColumns = "0" oTree.FilterBarPromptPattern = "Fuller" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
432 |
Is it possible to list only items that starts with any of specified strings
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 3 oTree.FilterBarPromptColumns = "0" oTree.FilterBarPromptPattern = "An M" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
431 |
Is it possible to list only items that starts with specified string
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 3 oTree.FilterBarPromptColumns = "0" oTree.FilterBarPromptPattern = "A" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
430 |
How can I specify that the list should include any of the seqeunces in the pattern
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 2 oTree.FilterBarPromptPattern = "london seattle" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
429 |
How can I specify that all sequences in the filter pattern must be included in the list
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptType = 1 oTree.FilterBarPromptPattern = "london manager" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
428 |
How do I change at runtime the filter prompt
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptPattern = "london manager" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
427 |
How do I specify to filter only a single column when using the filter prompt
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPromptColumns = "2,3" oTree.FilterBarPromptPattern = "london" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
426 |
How do I change the prompt or the caption being displayed in the filter bar
Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. oTree.FilterBarPrompt = "changed" var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") oTree.EndUpdate() |
425 |
How do I enable the filter prompt feature
Dim h0 as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Columns as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.BeginUpdate() oTree.ColumnAutoResize = .t. oTree.ContinueColumnScroll = .f. oTree.MarkSearchColumn = .f. oTree.SearchColumnIndex = 1 oTree.FilterBarPromptVisible = .t. var_Columns = oTree.Columns ' var_Columns.Add("Name").Width = 96 var_Column = var_Columns.Add("Name") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 96" ' var_Columns.Add("Title").Width = 96 var_Column1 = var_Columns.Add("Title") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.Width = 96" var_Columns.Add("City") var_Items = oTree.Items h0 = var_Items.AddItem("Nancy Davolio") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Andrew Fuller") ' var_Items.CellCaption(h0,1) = "Vice President, Sales" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Vice President, Sales`" ' var_Items.CellCaption(h0,2) = "Tacoma" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Tacoma`" ' var_Items.SelectItem(h0) = .t. oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.SelectItem(h0) = True" h0 = var_Items.AddItem("Janet Leverling") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Kirkland" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Kirkland`" h0 = var_Items.AddItem("Margaret Peacock") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "Redmond" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Redmond`" h0 = var_Items.AddItem("Steven Buchanan") ' var_Items.CellCaption(h0,1) = "Sales Manager" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Manager`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Michael Suyama") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Robert King") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" h0 = var_Items.AddItem("Laura Callahan") ' var_Items.CellCaption(h0,1) = "Inside Sales Coordinator" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Inside Sales Coordinator`" ' var_Items.CellCaption(h0,2) = "Seattle" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `Seattle`" h0 = var_Items.AddItem("Anne Dodsworth") ' var_Items.CellCaption(h0,1) = "Sales Representative" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,1) = `Sales Representative`" ' var_Items.CellCaption(h0,2) = "London" oTree.TemplateDef = "dim var_Items,h0" oTree.TemplateDef = var_Items oTree.TemplateDef = h0 oTree.Template = "var_Items.CellCaption(h0,2) = `London`" oTree.EndUpdate() |
424 |
I have an EBN file how can I apply different colors to it, so no need to create a new one
Dim h as N Dim hC as N Dim oTree as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") oTree.SelBackColor = oTree.BackColor oTree.SelForeColor = oTree.ForeColor oTree.HasLines = 0 oTree.Columns.Add("Default") var_Items = oTree.Items h = var_Items.AddItem("Root") hC = var_Items.InsertItem(h,,"Default") ' var_Items.ItemBackColor(hC) = 16777216 oTree.TemplateDef = "dim var_Items,hC" oTree.TemplateDef = var_Items oTree.TemplateDef = hC oTree.Template = "var_Items.ItemBackColor(hC) = 16777216" ' var_Items.ItemHeight(var_Items.InsertItem(h,,"")) = 6 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHeight(InsertItem(h,,``)) = 6" hC = var_Items.InsertItem(h,,"Light Green") ' var_Items.ItemBackColor(hC) = 16842496 oTree.TemplateDef = "dim var_Items,hC" oTree.TemplateDef = var_Items oTree.TemplateDef = hC oTree.Template = "var_Items.ItemBackColor(hC) = 16842496" ' var_Items.ItemHeight(var_Items.InsertItem(h,,"")) = 6 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHeight(InsertItem(h,,``)) = 6" hC = var_Items.InsertItem(h,,"Dark Green") ' var_Items.ItemBackColor(hC) = 16809728 oTree.TemplateDef = "dim var_Items,hC" oTree.TemplateDef = var_Items oTree.TemplateDef = hC oTree.Template = "var_Items.ItemBackColor(hC) = 16809728" ' var_Items.ItemHeight(var_Items.InsertItem(h,,"")) = 6 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHeight(InsertItem(h,,``)) = 6" hC = var_Items.InsertItem(h,,"Magenta") ' var_Items.ItemBackColor(hC) = 33521663 oTree.TemplateDef = "dim var_Items,hC" oTree.TemplateDef = var_Items oTree.TemplateDef = hC oTree.Template = "var_Items.ItemBackColor(hC) = 33521663" ' var_Items.ItemHeight(var_Items.InsertItem(h,,"")) = 6 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHeight(InsertItem(h,,``)) = 6" hC = var_Items.InsertItem(h,,"Yellow") ' var_Items.ItemBackColor(hC) = 25165823 oTree.TemplateDef = "dim var_Items,hC" oTree.TemplateDef = var_Items oTree.TemplateDef = hC oTree.Template = "var_Items.ItemBackColor(hC) = 25165823" ' var_Items.ItemHeight(var_Items.InsertItem(h,,"")) = 6 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemHeight(InsertItem(h,,``)) = 6" ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
423 |
How can I change the foreground color for a particular column
Dim oTree as P Dim var_Column as local Dim var_Columns as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Columns = oTree.Columns var_Columns.Add("Column 1") ' var_Columns.Add("Column 2").Def(8) = 8439039 var_Column = var_Columns.Add("Column 2") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(8) = 8439039" var_Columns.Add("Column 3") |
422 |
How can I change the background color for a particular column
Dim oTree as P Dim var_Column as local Dim var_Columns as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Columns = oTree.Columns var_Columns.Add("Column 1") ' var_Columns.Add("Column 2").Def(7) = 8439039 var_Column = var_Columns.Add("Column 2") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(7) = 8439039" var_Columns.Add("Column 3") |
421 |
How can I display the column using currency format and enlarge the font for certain values
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Column = oTree.Columns.Add("Currency") ' var_Column.Def(17) = 1 oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Column.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)" var_Items = oTree.Items var_Items.AddItem("1.23") var_Items.AddItem("2.34") var_Items.AddItem("9.94") var_Items.AddItem("11.94") var_Items.AddItem("1000") |
420 |
How can I highlight only parts of the cells
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Column = oTree.Columns.Add("") ' var_Column.Def(17) = 1 oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Column.FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'" var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
419 |
How can I get the number of occurrences of a specified string in the cell
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("") var_Column = oTree.Columns.Add("occurrences") var_Column.ComputedField = "lower(%0) count 'o'" var_Column.FormatColumn = "'contains ' + value + ' of \'o\' chars'" var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1 oooof the root") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"Child 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
418 |
How can I display dates in my format
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex var_Column = oTree.Columns.Add("Date") ' var_Column.Def(17) = 1 oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Column.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'" var_Items = oTree.Items var_Items.AddItem({01/21/2001}) var_Items.AddItem({02/22/2002}) var_Items.AddItem({03/13/2003}) var_Items.AddItem({04/24/2004}) |
417 |
How can I display dates in short format
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Date").FormatColumn = "shortdate(value)" var_Column = oTree.Columns.Add("Date") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.FormatColumn = `shortdate(value)`" var_Items = oTree.Items var_Items.AddItem({01/01/2001}) var_Items.AddItem({02/02/2002}) var_Items.AddItem({03/03/2003}) var_Items.AddItem({04/04/2004}) |
416 |
How can I display dates in long format
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Date").FormatColumn = "longdate(value)" var_Column = oTree.Columns.Add("Date") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.FormatColumn = `longdate(value)`" var_Items = oTree.Items var_Items.AddItem({01/01/2001}) var_Items.AddItem({02/02/2002}) var_Items.AddItem({03/03/2003}) var_Items.AddItem({04/04/2004}) |
415 |
How can I display only the right part of the cell
Dim h as N Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("") var_Column = oTree.Columns.Add("Right") var_Column.ComputedField = "%0 right 2" var_Column.FormatColumn = "'\"' + value + '\"'" var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"SChild 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
414 |
How can I display only the left part of the cell
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("") ' oTree.Columns.Add("Left").ComputedField = "%0 left 2" var_Column = oTree.Columns.Add("Left") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `%0 left 2`" var_Items = oTree.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.InsertItem(h,,"SChild 3") ' var_Items.ExpandItem(h) = .t. oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.ExpandItem(h) = True" |
413 |
How can I display true or false instead 0 and -1
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'" var_Column = oTree.Columns.Add("Boolean") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.FormatColumn = `value != 0 ? 'true' : 'false'`" var_Items = oTree.Items var_Items.AddItem(.t.) var_Items.AddItem(.f.) var_Items.AddItem(.t.) var_Items.AddItem(0) var_Items.AddItem(1) |
412 |
How can I display icons or images instead numbers
Dim oTree as P Dim var_Column as P Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") var_Column = oTree.Columns.Add("Icons") ' var_Column.Def(17) = 1 oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Def(17) = 1" var_Column.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value" var_Items = oTree.Items var_Items.AddItem(1) var_Items.AddItem(2) var_Items.AddItem(3) |
411 |
How can I display the column using currency
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Currency").FormatColumn = "currency(dbl(value))" var_Column = oTree.Columns.Add("Currency") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.FormatColumn = `currency(dbl(value))`" var_Items = oTree.Items var_Items.AddItem("1.23") var_Items.AddItem("2.34") var_Items.AddItem("0") var_Items.AddItem(5) var_Items.AddItem("10000.99") |
410 |
How can I display the currency only for not empty cells
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Number") ' oTree.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''" var_Column = oTree.Columns.Add("Currency") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `len(%0) ? currency(dbl(%0)) : ''`" var_Items = oTree.Items var_Items.AddItem("1.23") var_Items.AddItem("2.34") var_Items.AddItem("0") ' var_Items.ItemBackColor(var_Items.AddItem()) = 8421631 oTree.TemplateDef = "dim var_Items" oTree.TemplateDef = var_Items oTree.Template = "var_Items.ItemBackColor(AddItem()) = 8421631" var_Items.AddItem("10000.99") |
409 |
Is there a function to display the number of days between two date including the number of hours
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Column1 as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.Columns.Add("Start").Width = 32 var_Column = oTree.Columns.Add("Start") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.Width = 32" oTree.Columns.Add("End") ' oTree.Columns.Add("Duration").ComputedField = "2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )" var_Column1 = oTree.Columns.Add("Duration") oTree.TemplateDef = "dim var_Column1" oTree.TemplateDef = var_Column1 oTree.Template = "var_Column1.ComputedField = `2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )`" var_Items = oTree.Items h = var_Items.AddItem({01/11/2001}) ' var_Items.CellCaption(h,1) = {01/14/2001} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #1/14/2001#" h = var_Items.AddItem({02/22/2002 12:00:00}) ' var_Items.CellCaption(h,1) = {03/14/2002 13:00:00} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #3/14/2002 1:00:00 PM#" h = var_Items.AddItem({03/13/2003}) ' var_Items.CellCaption(h,1) = {04/11/2003 11:00:00} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #4/11/2003 11:00:00 AM#" |
408 |
Is there a function to display the number of days between two date including the number of hours
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Start") oTree.Columns.Add("End") ' oTree.Columns.Add("Duration").ComputedField = "\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))" var_Column = oTree.Columns.Add("Duration") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))`" var_Items = oTree.Items h = var_Items.AddItem({01/11/2001}) ' var_Items.CellCaption(h,1) = {01/14/2001 23:00:00} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #1/14/2001 11:00:00 PM#" h = var_Items.AddItem({02/22/2002 12:00:00}) ' var_Items.CellCaption(h,1) = {03/14/2002 13:00:00} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #3/14/2002 1:00:00 PM#" h = var_Items.AddItem({03/13/2003}) ' var_Items.CellCaption(h,1) = {04/11/2003 11:00:00} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #4/11/2003 11:00:00 AM#" |
407 |
How can I display the number of days between two dates
Dim h as N Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Start") oTree.Columns.Add("End") ' oTree.Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'" var_Column = oTree.Columns.Add("Duration") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `(date(%1)-date(%0)) + ' days'`" var_Items = oTree.Items h = var_Items.AddItem({01/11/2001}) ' var_Items.CellCaption(h,1) = {01/14/2001} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #1/14/2001#" h = var_Items.AddItem({02/22/2002}) ' var_Items.CellCaption(h,1) = {03/14/2002} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #3/14/2002#" h = var_Items.AddItem({03/13/2003}) ' var_Items.CellCaption(h,1) = {04/11/2003} oTree.TemplateDef = "dim var_Items,h" oTree.TemplateDef = var_Items oTree.TemplateDef = h oTree.Template = "var_Items.CellCaption(h,1) = #4/11/2003#" |
406 |
How can I get second part of the date
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Date") ' oTree.Columns.Add("Second").ComputedField = "sec(date(%0))" var_Column = oTree.Columns.Add("Second") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `sec(date(%0))`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:10:00}) var_Items.AddItem({02/22/2002 11:01:22}) var_Items.AddItem({03/13/2003 12:23:01}) var_Items.AddItem({04/14/2004 13:11:59}) |
405 |
How can I get minute part of the date
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Date") ' oTree.Columns.Add("Minute").ComputedField = "min(date(%0))" var_Column = oTree.Columns.Add("Minute") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `min(date(%0))`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:10:00}) var_Items.AddItem({02/22/2002 11:01:00}) var_Items.AddItem({03/13/2003 12:23:00}) var_Items.AddItem({04/14/2004 13:11:00}) |
404 |
How can I check the hour part only so I know it was afternoon
Dim oTree as P Dim var_Column as local Dim var_ConditionalFormat as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex ' oTree.ConditionalFormats.Add("hour(%0)>=12").Bold = .t. var_ConditionalFormat = oTree.ConditionalFormats.Add("hour(%0)>=12") oTree.TemplateDef = "dim var_ConditionalFormat" oTree.TemplateDef = var_ConditionalFormat oTree.Template = "var_ConditionalFormat.Bold = True" oTree.Columns.Add("Date") ' oTree.Columns.Add("Hour").ComputedField = "hour(%0)" var_Column = oTree.Columns.Add("Hour") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `hour(%0)`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:00:00}) var_Items.AddItem({02/22/2002 11:00:00}) var_Items.AddItem({03/13/2003 12:00:00}) var_Items.AddItem({04/14/2004 13:00:00}) |
403 |
What about a function to get the day in the week, or days since Sunday
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Date") ' oTree.Columns.Add("WeekDay").ComputedField = "weekday(%0)" var_Column = oTree.Columns.Add("WeekDay") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `weekday(%0)`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:00:00}) var_Items.AddItem({02/22/2002 11:00:00}) var_Items.AddItem({03/13/2003 12:00:00}) var_Items.AddItem({04/14/2004 13:00:00}) |
402 |
Is there any function to get the day of the year or number of days since January 1st
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Date") ' oTree.Columns.Add("Day since January 1st").ComputedField = "yearday(%0)" var_Column = oTree.Columns.Add("Day since January 1st") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `yearday(%0)`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:00:00}) var_Items.AddItem({02/22/2002 11:00:00}) var_Items.AddItem({03/13/2003 12:00:00}) var_Items.AddItem({04/14/2004 13:00:00}) |
401 |
How can I display only the day of the date
Dim oTree as P Dim var_Column as local Dim var_Items as P oTree = topparent:CONTROL_ACTIVEX1.activex oTree.Columns.Add("Date") ' oTree.Columns.Add("Day").ComputedField = "day(%0)" var_Column = oTree.Columns.Add("Day") oTree.TemplateDef = "dim var_Column" oTree.TemplateDef = var_Column oTree.Template = "var_Column.ComputedField = `day(%0)`" var_Items = oTree.Items var_Items.AddItem({01/11/2001 10:00:00}) var_Items.AddItem({02/22/2002 11:00:00}) var_Items.AddItem({03/13/2003 12:00:00}) var_Items.AddItem({04/14/2004 13:00:00}) |